package com.muyu.system.service.impl;


import com.muyu.common.core.utils.DateUtils;
import com.muyu.system.domain.DanmoShoppingDoor;
import com.muyu.system.mapper.DanmoShoppingDoorMapper;
import com.muyu.system.service.IDanmoShoppingDoorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品门头 Service业务层处理
 * 
 * @author kunzong
 * @date 2024-12-02
 */
@Service
public class DanmoShoppingDoorServiceImpl implements IDanmoShoppingDoorService
{
    @Autowired
    private DanmoShoppingDoorMapper danmoShoppingDoorMapper;

    /**
     * 查询商品门头 
     * 
     * @param id 商品门头 主键
     * @return 商品门头 
     */
    @Override
    public DanmoShoppingDoor selectDanmoShoppingDoorById(Long id)
    {
        return danmoShoppingDoorMapper.selectDanmoShoppingDoorById(id);
    }

    /**
     * 查询商品门头 列表
     * 
     * @param danmoShoppingDoor 商品门头 
     * @return 商品门头 
     */
    @Override
    public List<DanmoShoppingDoor> selectDanmoShoppingDoorList(DanmoShoppingDoor danmoShoppingDoor)
    {
        return danmoShoppingDoorMapper.selectDanmoShoppingDoorList(danmoShoppingDoor);
    }

    /**
     * 新增商品门头 
     * 
     * @param danmoShoppingDoor 商品门头 
     * @return 结果
     */
    @Override
    public int insertDanmoShoppingDoor(DanmoShoppingDoor danmoShoppingDoor)
    {
        danmoShoppingDoor.setCreateTime(DateUtils.getNowDate());
        return danmoShoppingDoorMapper.insertDanmoShoppingDoor(danmoShoppingDoor);
    }

    /**
     * 修改商品门头 
     * 
     * @param danmoShoppingDoor 商品门头 
     * @return 结果
     */
    @Override
    public int updateDanmoShoppingDoor(DanmoShoppingDoor danmoShoppingDoor)
    {
        danmoShoppingDoor.setUpdateTime(DateUtils.getNowDate());
        return danmoShoppingDoorMapper.updateDanmoShoppingDoor(danmoShoppingDoor);
    }

    /**
     * 批量删除商品门头 
     * 
     * @param ids 需要删除的商品门头 主键
     * @return 结果
     */
    @Override
    public int deleteDanmoShoppingDoorByIds(Long[] ids)
    {
        return danmoShoppingDoorMapper.deleteDanmoShoppingDoorByIds(ids);
    }

    /**
     * 删除商品门头 信息
     * 
     * @param id 商品门头 主键
     * @return 结果
     */
    @Override
    public int deleteDanmoShoppingDoorById(Long id)
    {
        return danmoShoppingDoorMapper.deleteDanmoShoppingDoorById(id);
    }
}
